package com.spring.common.web.model;

import java.util.Date;

import com.sso.api.web.model.RequestUser;

public class ContractBaby {
    private String id;

    private String cuserid;

    private String contractid;

    private String realname;

    private String memberName;

    private Integer sexcode;

    private Date birthday;

    private String applicationid;

    private Date createdtime;

    private Date changedtime;

    private String initialoperatorid;

    private String initialoperatorname;

    private String operatorid;

    private String operatorname;

    private Integer entityavailablestate;
    
    public void setData(Contract contract,RequestUser requestUser){
    	this.cuserid=requestUser.getC_user_id();
    	this.contractid=contract.getId();
    	this.realname=requestUser.getReal_name();
    	this.memberName=requestUser.getMember_name();
    	this.sexcode=Integer.parseInt(requestUser.getSex_code());
    	this.birthday= new Date(Long.parseLong(requestUser.getBirthday())*1000);  ;
    	this.initialoperatorid=contract.getInitialoperatorid();
    	this.initialoperatorname=contract.getInitialoperatorname();
    	this.operatorid=contract.getOperatorid();
    	this.operatorname=contract.getOperatorname();
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getCuserid() {
        return cuserid;
    }

    public void setCuserid(String cuserid) {
        this.cuserid = cuserid == null ? null : cuserid.trim();
    }

    public String getContractid() {
        return contractid;
    }

    public void setContractid(String contractid) {
        this.contractid = contractid == null ? null : contractid.trim();
    }

    public String getRealname() {
        return realname;
    }

    public void setRealname(String realname) {
        this.realname = realname == null ? null : realname.trim();
    }

    public String getMemberName() {
        return memberName;
    }

    public void setMemberName(String memberName) {
        this.memberName = memberName == null ? null : memberName.trim();
    }

    public Integer getSexcode() {
        return sexcode;
    }

    public void setSexcode(Integer sexcode) {
        this.sexcode = sexcode;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getApplicationid() {
        return applicationid;
    }

    public void setApplicationid(String applicationid) {
        this.applicationid = applicationid == null ? null : applicationid.trim();
    }

    public Date getCreatedtime() {
        return createdtime;
    }

    public void setCreatedtime(Date createdtime) {
        this.createdtime = createdtime;
    }

    public Date getChangedtime() {
        return changedtime;
    }

    public void setChangedtime(Date changedtime) {
        this.changedtime = changedtime;
    }

    public String getInitialoperatorid() {
        return initialoperatorid;
    }

    public void setInitialoperatorid(String initialoperatorid) {
        this.initialoperatorid = initialoperatorid == null ? null : initialoperatorid.trim();
    }

    public String getInitialoperatorname() {
        return initialoperatorname;
    }

    public void setInitialoperatorname(String initialoperatorname) {
        this.initialoperatorname = initialoperatorname == null ? null : initialoperatorname.trim();
    }

    public String getOperatorid() {
        return operatorid;
    }

    public void setOperatorid(String operatorid) {
        this.operatorid = operatorid == null ? null : operatorid.trim();
    }

    public String getOperatorname() {
        return operatorname;
    }

    public void setOperatorname(String operatorname) {
        this.operatorname = operatorname == null ? null : operatorname.trim();
    }

    public Integer getEntityavailablestate() {
        return entityavailablestate;
    }

    public void setEntityavailablestate(Integer entityavailablestate) {
        this.entityavailablestate = entityavailablestate;
    }
}